﻿@model MyMvcStoreApplication.Models.Album

@{
    var urlUnknownAlbum = Url.Content("~/Content/Images/unknown_album.jpg");
}

<fieldset>
    <legend>Album</legend>

    <div class="display-label">Nombre</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Nombre)
    </div>

    <div class="display-label">Artista</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Artista.Nombre)
    </div>

    <div class="display-label">Género</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Genero.Nombre)
    </div>

    <div class="display-label">Likes</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Likes)
    </div>

    <div class="display-label">TapaAlbumURL</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.TapaAlbumURL)
        @if (String.IsNullOrEmpty(Model.TapaAlbumURL))
        {
            <span>Sin especificar</span>
        }
    </div>

    <div class="editor-field">
        <img class="imgsmall" id="imgminiatura" alt="imagen miniatura" src="@(String.IsNullOrEmpty(Model.TapaAlbumURL) ? @urlUnknownAlbum : @Model.TapaAlbumURL)"/>
    </div>
</fieldset>